// const BASE_URL = '/dpc/v1'
const BASE_URL = 'http://express.sugouex.com/v1'
export const myhicky =(options)=>{
return new Promise((resolve,reject)=>{
	wx.request({
		 url:BASE_URL+options.url,
		  method:options.method || 'GET',
		  data: options.data || {},
		  // sslVerify:false,
		  // uni.getStorageSync('token')
		  header: {'token':'890bc3ed0bdc409f803aee56fc7c24483efc2f92'},
		  success: (res)=>{
				console.log(res)
			if(res.data.code!== 200){		//成功条件
				return wx.showToast({
					title: res.data.message
				})
			}  
			resolve(res)
		  },
		  fail:(err)=>{
			wx.showToast({
				title:'请求接口失败',
			})  
			resolve(res,'失败原因')
		  },
	 })
	}) 
}
